'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview pvp奖励相关
 * @author sundbcn@gmail.com (sun debing)
 */

var _ = require('lodash');
var battleConf = require('../config/battleConf');
var randomUtil = require('../util/randomUtil');
var genRewardService = require('./genRewardService');
var levelService = require('./levelService');

/**
 * 给用户添加奖励列表
 * @param {[type]} reward_list [description]
 */
exports.getReward = function (job_type) {
    var pvp_prize_conf = battleConf.getPvpPrizeConf(job_type);
    var pvp_prize_random_list = randomUtil.sample(pvp_prize_conf, 3);
    var reward_list = [];
    _.each(pvp_prize_random_list, function (pvp_prize_item) {
        reward_list.push(genRewardService.generateReward(pvp_prize_item));
    });
    return reward_list;
};
